package com.shs.service;
 
import com.shs.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.math.BigDecimal;
 

//需要调用库存微服务的名称（feign接口加注解进行调用）
@FeignClient(value = "seata-storage-service")
public interface StorageService{
    @PostMapping(value = "/storage/decrease")
    //根据产品id做库存预减，减完之后统计数量
    CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
 
